# !/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName : zsj.py
# @Time     : 2024/4/9 19:22
# @Author   : Robot-Zsj
"""
description:


input
1-2abcd
output
-1
"""
import re

s = input()


def getResult():
    reg = re.compile(r'(-?\d+)([+*-])(\d+)')

    maxExpLen = 0

    ans = 0

    for i in range(len(s)):

        if len(s) - i <= maxExpLen:
            break

        for j in range(i, len(s)):
            subStr = s[i:j + 1]
            match = reg.search(subStr)
            if match and len(subStr) > maxExpLen:
                maxExpLen = len(subStr)

                num1 = int(match.group(1))
                op = match.group(2)
                num2 = int(match.group(3))

                if op == '*':
                    ans = num1 * num2
                elif op == '+':
                    ans = num1 + num2
                elif op == '-':
                    ans = num1 - num2
    return ans


print(getResult())
